uniform float time;
float rand(float co) {
    return fract(sin(dot(co,12.9898+78.233)) * 43758.5453);
}
void mainImage( out vec4 fragcolor, in vec2 fragCoord ) {
	vec2 uv = fragCoord.xy / iResolution.xy;
	vec2 uv1 = uv;
    
    uv1.x-=rand(uv.y*time)/30.;
    vec4 e = texture(iChannel0,uv1);
    vec4 bn = vec4(vec3(e.r+e.g+e.b)/3.,1.0);
	
	vec2 offset = vec2(sin(time)/30.,0.01*rand(time));
    // 抖动
    if(time<=1.){
        fragcolor=e; 
    }
    //抖动+分通道 
    if(time>1.&&time<=2.){
        e.r = texture(iChannel0, uv).r;
	    e.g = texture(iChannel0, uv-offset.xy).g;
	    e.b = texture(iChannel0, uv+offset.xy).b;
        fragcolor=mix(e,bn,0.3);     
    }
    // 分通道
    if(time>2.&&time<=4.5){
        
        e.r = texture(iChannel0, uv).r;
	    e.g = texture(iChannel0, uv-offset.xy).g;
	    e.b = texture(iChannel0, uv+offset.xy).b;
        fragcolor=e;
    }
    // 正常
    if(time>4.5){
        fragcolor=texture(iChannel0, uv);
    } 
}